package com.ebupt.migu.music.megamarket.service.impl;

import com.ebupt.migu.music.common.entity.ResultObject;
import com.ebupt.migu.music.common.exception.StatusEnum;
import com.ebupt.migu.music.megamarket.mapper.MegamarketMapper;
import com.ebupt.migu.music.megamarket.service.MegamarketService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author liuyangyang@e-byte.com
 * @description: TODO
 * @date 2023/11/27 14:09
 */
@Slf4j
@Service
public class MegamarketServiceImpl implements MegamarketService {
    @Autowired
    MegamarketMapper mapper;

    /**
     * 查询短信端口号配置
     * 
     * @return
     */
    @Override
    public ResultObject qryConf() {
        ResultObject res = new ResultObject();
        try {
            res.setCode(StatusEnum.SUCCESS.getCode());
            res.setMsg(StatusEnum.SUCCESS.getMsg());
            res.setData(mapper.megamarkets());
            return res;
        } catch (Exception e) {
            e.printStackTrace();
            log.error(e.getMessage());
            res.setCode(StatusEnum.ERROR.getCode());
            res.setMsg(StatusEnum.ERROR.getMsg());
            return res;
        }
    }
}
